﻿#include <opencv2\opencv.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main()
{
	Mat image = imread("C:/Users/aaa/Pictures/Screenshots/Lena.png");
	Mat image32;
	image.convertTo(image32, CV_32F, 1 / 255.0, 0);
	Mat gray0, gray1;
	cvtColor(image, gray0, COLOR_BGR2GRAY);
	cvtColor(image32, gray1, COLOR_RGB2GRAY);

	Mat images[3];
	split(image, images);

	Mat image0, image1, image2;

	image0 = images[0];
	image1 = images[1];
	image2 = images[2];

	Mat image_H;
	merge(images, 3, image_H);

	Mat zero = Mat::zeros(Size(image.cols, image.rows), CV_8UC1);

	vector<Mat> imagesV;
	imagesV.push_back(image0);
	imagesV.push_back(zero);
	imagesV.push_back(zero);

	//
	Mat imagesVH;
	merge(imagesV, imagesVH);

	return 0;
}